<template>
  <div class="standards-management-container">
    <el-card class="search-card">

      <!-- 搜索条件区域 - 改为纵向排列 -->
      <div class="search-filters">
        <!-- 行业筛选 -->
        <div class="filter-group">
          <span class="filter-label">行业：</span>
         
           <span 
            class="all-button"
            :class="{ 'active': selectedIndustry === '' || selectedIndustry === null || selectedIndustry === undefined }"
            @click="handleAllButtonClick('industry')"
          >
            全部
          </span>
          <el-radio-group v-model="selectedIndustry" size="small" @change="handleChangehy">
            <el-radio-button v-for="item in industryOptions" :key="item.id" :label="item.id">
              {{ item.name }}
            </el-radio-button>
          </el-radio-group>
        </div>

        <!-- 分类筛选 -->
        <div class="filter-group">
          <span class="filter-label">分类：</span>
         
           <span 
            class="all-button"
            :class="{ 'active': selectedCategory === '' || selectedCategory === null || selectedCategory === undefined }"
            @click="handleAllButtonClick('category')"
          >
            全部
          </span>
          <el-radio-group v-model="selectedCategory" size="small" @change="handleCategoryChange">
            <el-radio-button v-for="item in categoryOptions" :key="item.id" :label="item.id">
              {{ item.name }}
            </el-radio-button>
          </el-radio-group>
        </div>

        <!-- 状态筛选 -->
        <div class="filter-group">
          <span class="filter-label">产品：</span>
          
          <span 
            class="all-button"
            :class="{ 'active': selectedStatus === '' || selectedStatus === null || selectedStatus === undefined }"
            @click="handleAllButtonClick('status')"
          >
            全部
          </span>
          <el-radio-group v-model="selectedStatus" size="small" @change="handleFilterChange">
            <el-radio-button v-for="item in statusOptions" :key="item.id" :label="item.id">
              {{ item.name }}
            </el-radio-button>
          </el-radio-group>
        </div>

        <!-- 关键词搜索 -->
        <div class="search-input-group">
          <span class="filter-label">查询：</span>
          <el-input v-model="searchQuery" placeholder="请输入查询内容" size="small" prefix-icon="el-icon-search"
            :clearable="true" style="width: 300px;" @keyup.enter.native="QueryList"></el-input>
         
          <button type="primary" size="small" @click="QueryList" icon="el-icon-refresh-left" class="resetbutton2">
            <i class="el-icon-search"></i>
            <span>查询</span>
          </button>
          <button type="primary" size="small" @click="handleReset" icon="el-icon-refresh-left" class="resetbutton">
            <i class="el-icon-refresh-left"></i>
            <span>重置</span>
          </button>


        </div>
        <div class="filter-group" v-if="$hasAnyRole(['admin', 'enterprise'])">
          <span class="filter-label">分类：</span>
          <!-- <el-button type="primary" @click="handleDownloadClick">下载表格</el-button> -->
          <button @click="handleDownloadClick" class="download-button"><i class="el-icon-download"></i><span>下载表格</span></button>

        </div>
      </div>
    </el-card>

    <!-- 结果区域 -->
    <el-card class="result-card">
      <div v-for="(product, index) in productList.rows" :key="index" class="product-item" @click="GotoClick(product)">
        <!-- <img :src="product.image" alt="产品图片" class="product-image"> -->
        <div class="product-image-container">
         
             <!-- <img v-if="product.image && product.image.trim() !== ''" :src="product.image" alt="产品图片"
            class="product-image">
          <div v-else class="product-initial-placeholder">
            {{ getFirstCharacter(product.name) }}
          </div> -->
           <el-image
            v-if="product.image && product.image.trim() !== ''"
            :src="product.image"
            style="width: 100px; height: 100px; cursor: pointer;"
            fit="contain"
            alt="产品图片"
          >
           </el-image>
        </div>
        <div class="product-info">
          <div class="title-row">
            <h3 class="product-title">{{ product.name }}</h3>
            <p>
              <span v-for="(tag, tagIndex) in product.baseIndustryList" :key="tagIndex" class="tag">
                <span> {{ tag.name
                }}</span>
               </span>

            </p>
          </div>
          <p class="product-desc">{{ product.description }}</p>
          <div class="meta-row">
            <span class="view-count"><i style="margin-right: 3px;" class="el-icon-view"></i>浏览量 {{ product.pvCount }}</span>
            <span class="company">{{ product.company }}</span>
            <span class="upload-date">上传日期 {{ product.createTime }}</span>
          </div>
        </div>
      </div>
      <!-- 查看更多按钮 -->
      <div v-if="hasMore" class="load-more-container">
        <span 
          class="load-more-button"
          @click="loadMore"
        >
          查看更多
        </span>
      </div>
    </el-card>

    <el-dialog title="选择分类" :visible.sync="comparedialog" width="620px" center>
      <span style="margin-right: 10px;font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;">产品</span><el-select v-model="conpareValue" placeholder="请选择" style="width: 90%;">
        <el-option v-for="item in compareoptions" :key="item.value" :label="item.label" :value="item.label">
        </el-option>
      </el-select>

      <span slot="footer" class="dialog-footer" style="display: flex;align-items: center;justify-content: space-around;">
        <button type="primary" class="dialogqxbtn" @click="comparedialog = false"><span>取消</span></button>
        <button type="primary" class="dialogqxTwo" @click="quedingDownload"><span>提交</span></button>
      </span>
    </el-dialog>
    
    <!-- 下载成功弹窗 -->
    <el-dialog
      :visible.sync="downloadSuccessVisible"
      width="620px"
      center
      :show-title="false"
      :show-close="true"
    >
      <div style="text-align: center; padding: 20px;">
        <img src="@/assets/img/pro/filesuccess.png" alt="下载成功" style="width: 88px; height: 88px; margin-bottom: 15px;">
        <p class="success-text">下载表格成功</p>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getDictList, getProductCompareList, getIndustryCategory, GcDownloadExcelByType, getProductCompareTypeList } from '../../api/user';
import vueconfig from '../../../vue.config'
export default {
  name: 'StandardsManagement',
  data() {
    return {
      // 筛选条件选项
      industryOptions: [],
      categoryOptions: [],
      statusOptions: [],
      standardList: [],
      productList: { total: 0, rows: [] },
      // 选中的筛选条件
      selectedIndustry: '',
      selectedCategory: '',
      selectedStatus: '',
      searchQuery: '',
      currentPage: 1,
      comparedialog: false,
      conpareValue: '',
      pageSize: 10,
      // 是否还有更多数据可加载
      hasMore: true,
      uploadDialogVisible: false,
      fileListTemp: [],
      vueconfig: '',
      compareoptions: [],
      // 下载弹窗控制
      downloadSuccessVisible: false
    };
  },
  created() {
    // this.getDictlists();
    this.gethyeList();
    this.QueryList();
    this.vueconfig = vueconfig.devServer.proxy["/api"].target;
  },
  methods: {

    // 上传表格文件


    handlePreviewTemp(file) {
      console.log(file, "1");
    },
    handleRemoveTemp(file, fileList) {
      console.log(file, fileList, "文件列表移除文件时的钩子");
    },

    OnExceedTemp() {

      this.$message.error("文件上传超出限制",1000);
    },
    submitTableUpload() {

      this.uploadDialogVisible = false;
      this.$refs.uploadTemp.submit();
    },


    // 处理筛选条件变化
    handleChangehy(value) {
      this.selectedIndustry = value;
    },
    handleCategoryChange(value) {
      this.selectedCategory = value;
    },
    handleFilterChange(value) {
      this.selectedStatus = value;
    },
    // 处理全部按钮点击
    handleAllButtonClick(type) {
      if (type === 'industry') {
        this.selectedIndustry = '';
      } else if (type === 'category') {
        this.selectedCategory = '';
      } else if (type === 'status') {
        this.selectedStatus = '';
      }
      this.QueryList();
    },
    // 处理重置
    handleReset() {
      this.selectedIndustry = '';
      this.selectedCategory = '';
      this.selectedStatus = '';
      this.searchQuery = '';
      this.$message.success('筛选条件已重置', 1000);
      this.QueryList()
    },

    // 根据value获取option的label
    getOptionLabel(value, options) {
      const option = options.find(item => item.value === value);
      return option ? option.label : value;
    },

    getDictlists() {
      getDictList("sys_yes_no").then(res => {
        if (res.code === 200) {
          this.statusOptions = res.data;
        } else {
          // this.$message.error('获取状态信息失败',1000);
          console.error('获取状态信息失败:', res);
        }
      })
    },
    // 获取行业分类列表
    gethyeList() {
      getIndustryCategory()
        .then(res => {
          // 检查res和res.data是否存在
          if (!res || !res.data || !Array.isArray(res.data)) {
            console.error('数据格式错误:', res);
            // this.$message.error('获取行业分类数据失败',1000);
            return;
          }
          this.industryOptions = res.data

          // 方法1: 根据id或name查找目标数据（推荐）
          // 假设我们需要查找id为1的"通信"分类下的子分类
          const targetItem = res.data.find(item => item.id === 1 || item.name === '通信');

          // 如果找到了目标项且它有childArray，就使用它
          if (targetItem && targetItem.childArray) {
            this.categoryOptions = targetItem.childArray;
          } else {
            // 备选方案: 使用第一个有childArray的项
            const firstValidItem = res.data.find(item => item.childArray && Array.isArray(item.childArray));
            if (firstValidItem) {
              this.categoryOptions = firstValidItem.childArray;
            } else {
              // 如果都找不到，使用默认空数组避免报错
              this.categoryOptions = [];
              console.warn('未找到有效的分类数据');
            }
          }

          const childItem = res.data[0].childArray.find(item => item.id === 10 || item.name === '数据通信');
          if (childItem && childItem.childArray) {
            this.statusOptions = childItem.childArray;
          }



        })
        .catch(error => {
          console.error('获取行业分类数据失败:', error);
          this.categoryOptions = []; // 出错时设置为空数组
        })
    },
    // 在 methods 对象中添加以下方法
    getFirstCharacter(name) {
      if (!name || name.length === 0) {
        return '?';
      }

      // 使用正则表达式匹配第一个汉字
      const chineseCharMatch = name.match(/[\u4e00-\u9fa5]/);
      if (chineseCharMatch) {
        // 如果找到汉字，返回第一个汉字
        return chineseCharMatch[0];
      } else {
        // 如果没有汉字，返回第一个字符的大写形式
        return name.charAt(0).toUpperCase();
      }
    },
    // 筛选条件变化时触发的方法
    // QueryList(){
    //   getStandardList({
    //     title: this.searchQuery,
    //     industryId: this.selectedIndustry,
    //     status: this.selectedStatus,
    //     type:1,
    //     pageSize: this.pageSize,
    //     pageNum: this.currentPage,
    //   }).then(res => {
    //     console.log(res);
    //     if (res.code === 200) {
    //       this.standardList = res.rows
    //     } else {
    //       this.$message.error('查询列表失败')
    //     }
    //   })
    // },
    QueryList() {
      // 重置页码和数据
      this.currentPage = 1;
      this.productList.rows = [];
      
      getProductCompareList({
        pageSize: this.pageSize,
        pageNum: this.currentPage,
        // 只有当参数有实际值时才展开添加
        ...(this.searchQuery && this.searchQuery.trim() !== '' ? { name: this.searchQuery } : {}),
        // 优先使用分类选择的值作为industryId，如果分类未选择则使用行业选择的值
        ...((this.selectedCategory && this.selectedCategory !== '' && this.selectedCategory !== null && this.selectedCategory !== undefined) ? 
           { industryId: this.selectedCategory } : 
           (this.selectedIndustry && this.selectedIndustry !== '' && this.selectedIndustry !== null && this.selectedIndustry !== undefined ? 
            { industryId: this.selectedIndustry } : {})),
        ...(this.selectedStatus && this.selectedStatus !== '' && this.selectedStatus !== null && this.selectedStatus !== undefined ? { status: this.selectedStatus } : {}),
      }).then(res => {
        if (res.code === 200) {
          // 修改赋值方式，同时保存total和rows
          this.productList = {
            total: res.total || 0,
            rows: res.rows || []
          };
          // 检查是否还有更多数据
          this.hasMore = this.productList.rows.length < this.productList.total;
        } else {
          // this.$message.error('查询列表失败',1000);
          console.error('查询列表失败:', res);
          // 出错时也应保持正确的数据结构
          this.productList = { total: 0, rows: [] };
          this.hasMore = false;
        }
      }).catch(error => {
        console.error('查询出错:', error);
        // this.$message.error('查询过程中发生错误',1000);
        // 捕获异常时也要保持正确的数据结构
          this.productList = { total: 0, rows: [] };
          this.hasMore = false;
      });
    },
    // handleDetailClick(item) {
    //   console.log(item);
    //   this.$router.push({
    //     path: '/guochanDetail',
    //     query: {
    //       id: item.type
    //     }
    //   })
    // },
    GotoClick(item) {
      this.$router.push({
        path: '/proDbDetail',
        query: {
          id: item.id
        }
      })
    },

    handleUploadClick() {
      this.uploadDialogVisible = true;
    },
    // 首先需要确保API请求配置正确的responseType
    // 首先需要确保API请求配置正确的responseType
    // 直接拼接路径下载文件
    handleDownloadClick() {
      this.comparedialog = true;
      getProductCompareTypeList().then(res => {
        console.log(res);
        if (res.code === 200) {
          // 修改这里：将字符串数组转换为el-select需要的格式
          // 使用数组索引作为value，字符串本身作为label
          this.compareoptions = res.data.map((item, index) => ({
            value: index.toString(), // 使用索引作为value，转换为字符串
            label: item // 直接使用字符串作为label
          }));
        } else {
          // this.$message.error('查询对比类型失败',1000);
          console.error('查询对比类型失败:', res);
        }
      })

    },
    quedingDownload() {
      GcDownloadExcelByType({ type: this.conpareValue }).then(res => {
        try {
          // 创建Blob对象
          const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
          // 创建下载链接
          const link = document.createElement('a');
          const url = URL.createObjectURL(blob);
          link.href = url;
          link.setAttribute('download', '产品对比导入模板.xlsx');

          // 添加到DOM并触发点击
          document.body.appendChild(link);
          link.click();

          // 清理资源
          setTimeout(() => {
            document.body.removeChild(link);
            URL.revokeObjectURL(url);
          }, 100);

          // 显示下载成功弹窗
          this.downloadSuccessVisible = true;
      this.comparedialog = false;

          // 2秒后自动关闭弹窗
          setTimeout(() => {
            this.downloadSuccessVisible = false;
          }, 2000);
        } catch (err) {
          console.error('下载失败:', err);
          this.$message.error('下载失败，请重试',1000);
        }
      }).catch(error => {
        console.error('请求失败:', error);
        this.$message.error('下载失败，请检查网络连接或联系管理员',1000);
      });
    },
    // 加载更多数据
    loadMore() {
      this.currentPage++;
      getProductCompareList({
        pageSize: this.pageSize,
        pageNum: this.currentPage,
        // 只有当参数有实际值时才展开添加
        ...(this.searchQuery && this.searchQuery.trim() !== '' ? { name: this.searchQuery } : {}),
        // 优先使用分类选择的值作为industryId，如果分类未选择则使用行业选择的值
        ...((this.selectedCategory && this.selectedCategory !== '' && this.selectedCategory !== null && this.selectedCategory !== undefined) ? 
           { industryId: this.selectedCategory } : 
           (this.selectedIndustry && this.selectedIndustry !== '' && this.selectedIndustry !== null && this.selectedIndustry !== undefined ? 
            { industryId: this.selectedIndustry } : {})),
        ...(this.selectedStatus && this.selectedStatus !== '' && this.selectedStatus !== null && this.selectedStatus !== undefined ? { status: this.selectedStatus } : {}),
      }).then(res => {
        if (res.code === 200) {
          // 追加新数据到现有列表
          this.productList.rows = [...this.productList.rows, ...(res.rows || [])];
          // 更新总数
          this.productList.total = res.total || 0;
          // 检查是否还有更多数据
          this.hasMore = this.productList.rows.length < this.productList.total;
        } else {
          console.error('加载更多失败:', res);
          this.hasMore = false;
        }
      }).catch(error => {
        console.error('加载更多失败:', error);
        this.hasMore = false;
      });
    },
  }
};
</script>

<style scoped>
.standards-management-container {
  margin: -10px;
  padding: 20px;
  font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  background-color: #152133;
  /* 确保背景色填充整个区域 */
  min-height: calc(100vh - 80px);
}

/* 全部按钮样式 */
.all-button {
  width: 58.8px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  cursor: pointer;
  border: 1px solid white;
  background: none;
  transform: skew(-5deg);
  border-radius: 4px;
  margin-right: 10px;
}

/* 全部按钮激活状态样式 */
.all-button.active {
  background: linear-gradient(360deg, #0085FF 0%, rgba(0, 163, 255, 0) 100%);
  border: 1px solid;
  border-top: none;
  border-radius: 4px;
  margin-right: 10px;
  
  transform: skew(-5deg);
  border-image: linear-gradient(180deg, rgba(0, 163, 255, 0), rgba(0, 163, 255, 1)) 1 1;
}

/* 全部按钮悬浮效果 */
.all-button:hover {
  background: linear-gradient(360deg, #0085FF 0%, rgba(0, 163, 255, 0) 100%);
  border: 1px solid;
  border-top: none;
  border-radius: 4px;
  border-image: linear-gradient(180deg, rgba(0, 163, 255, 0), rgba(0, 163, 255, 1)) 1 1;
}
/* :deep(.el-dialog__headerbtn) {
  display: none;
} */
.card-header {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
}

.search-card,
.result-card {
  margin-bottom: 20px;
  background-color: #04142B;
  border: 1px solid #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 1600px;
  margin: 0 auto 20px;
}

/* 修改为纵向排列 */
.search-filters {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px 0;
}

/* 每个筛选组单独占一行 */
.filter-group {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
}

.filter-label {
  margin-right: 10px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 60px;
  color: #ffffff;
}

/* 查询输入组也改为纵向排列的一部分 */
.search-input-group {
  display: flex;
  align-items: center;

  margin-left: 0;
  width: 100%;
}

/* 单选按钮组样式 */
:deep(.el-radio-group) {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

:deep(.el-radio-button__inner) {
  color: #ffffff;
  background-color: #04142B;
  border: 1px solid #fff;
  transform: skew(-5deg);
  transition: all 0.3s ease;
  border-radius: 0px !important;

}

:deep(.el-radio-button:hover .el-radio-button__inner) {
  background: linear-gradient(360deg, #0085FF 0%, rgba(0, 163, 255, 0) 100%);
  border-radius: 0px 0px 0px 0px;
   border: 1px solid rgba(0, 163, 255, 0.5);
  border-top: none;
  /* border-image: linear-gradient(180deg, rgba(0, 163, 255, 0), rgba(0, 163, 255, 1)) 1 1; */
}

/* 选中状态样式 */
:deep(.el-radio-button.is-active .el-radio-button__inner) {
  background: linear-gradient(360deg, #0085FF 0%, rgba(0, 163, 255, 0) 100%);
  border-radius: 0px 0px 0px 0px;
  border: 1px solid;
  border-image: linear-gradient(180deg, rgba(0, 163, 255, 0), rgba(0, 163, 255, 1)) 1 1;
}

/* 输入框样式 */
:deep(.el-input__inner) {
  background-color: #152133;
  border: 1px solid #fff;
  color: #ffffff;
  transform: skew(-5deg);

}

/* :deep(.el-input__inner:focus) {
  border-color: #2CDFE8;
  box-shadow: 0 0 0 2px rgba(44, 223, 232, 0.2);
} */

:deep(.el-button--primary) {
  background: linear-gradient(180deg, rgba(0, 135, 255, 0.25) 0%, rgba(0, 135, 255, 0.52) 100%) !important;
  border: none !important;
   background-color: transparent !important;
  /* 设置基础渐变背景 */
  /* background: linear-gradient(180deg, rgba(0, 135, 255, 0.25) 0%, rgba(0, 135, 255, 0.52) 100%) !important; */
  /* 确保文字为白色 */
  color: white !important;
  /* 移除默认边框或设置为透明 */
  border: none !important;
  /* 确保按钮内文字和图标颜色一致 */
  transform: skew(-5deg);
  width: 90px;
  height: 30px;
  border: 1px solid;
}

/* 查询按钮hover效果 */
:deep(.el-button--primary:hover) {
  background: linear-gradient(360deg, #0085FF 0%, rgba(0, 163, 255, 0) 100%) !important;
  border-color: transparent !important;
}



.result-card {
  /* padding: 20px; */
  border-radius: 8px;
}

.result-info {
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 20px;
}

.standards-management-container .el-card.result-card {
  border: none;
}

/* 卡片内容区域 */
:deep(.el-card__header) {
  border: none;
}

:deep(.el-card) {
  border: none;
}

/* 产品项样式优化 */
.product-item {
  display: flex;
  border-radius: 8px;
  padding: 20px 15px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  background-color: #04142B;
  height: 140px;
}

.product-item:hover {
  background: linear-gradient(90deg, #1A3B6B 0%, rgba(26, 59, 107, 0) 100%);
  border-color: #fff;
  transform: translateY(-2px);
}

.product-image-container {
  width: 100px;
  height: 100px;
  margin-right: 20px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: #152133; */
  /* border: 1px solid #fff; */
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-initial-placeholder {
  width: 100%;
  height: 100%;
  /* background-color: #1A3B6B; */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: #fff;
  border-radius: 6px;
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.title-row {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.product-title {
  font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
}

.product-desc {
  font-size: 14px;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 查询重置按钮 */
.resetbutton{
  width: 92px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #182F50;
  transform: skew(-10deg);
border-radius: 0px 0px 0px 0px;
border: 1px solid;
border-radius: 4px;
border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
}
.resetbutton span{
  transform: skew(10deg);
}
/* 移除重置按钮点击时的黑色边框 */
.resetbutton:focus {
  outline: none !important;
  border: 1px solid #1A9AD9;
  background: #182F50;
}
.resetbutton2{
  width: 92px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  margin: 0px 10px;

  justify-content: center;
  /* background: #182F50; */
  transform: skew(-10deg);
background: linear-gradient( 180deg, rgba(0,135,255,0.25) 0%, rgba(0,135,255,0.52) 100%);
border-radius: 0px 0px 0px 0px;
border: 1px solid;
border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
}
.resetbutton2 span{
  transform: skew(10deg);
}
/* 移除重置按钮点击时的黑色边框 */
.resetbutton2:focus {
  outline: none !important;
  border: 1px solid #1A9AD9;
  background: #182F50;
}
.resetbutton2:hover {
  background: linear-gradient( 360deg, #0085FF 0%, rgba(0,163,255,0) 100%);
border-radius: 0px 0px 0px 0px;
border: 1px solid;
border-image: linear-gradient(180deg, rgba(0, 163, 255, 0), rgba(0, 163, 255, 1)) 1 1;
border-top:none ;
}

/* 查询重置按钮 */
.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #b0b0b0;
}


.view-count {
  display: flex;
  align-items: center;
  color: #ddd;
  margin-right: auto;
  font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
}

.tag {
  /* background-color: #1A3B6B; */
  color: #fff;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #fff;
  display: inline-block; /* 确保transform可以正确应用 */
  transform: skew(-15deg);
  transform-origin: center; /* 设置变换原点 */
  margin: 0 5px;
  box-sizing: border-box; /* 确保盒模型计算正确 */
}
.tag > span {
  transform: skew(15deg); /* 内层文字反向倾斜，保持水平 */
  display: inline-block; /* 确保转换生效 */
}
.company {
  font-weight: 500;
  color: #e0e0e0;
}

.upload-date {
  color: #ddd;
  font-size: 12px;
  margin-left: auto;
font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
}

/* 查看更多按钮容器 */
.load-more-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

/* 查看更多按钮样式 */
.load-more-button {
  width: 404px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  cursor: pointer;
  background-image: url('../../assets/img/pro/watchother.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* 查看更多按钮悬浮效果 */
.load-more-button:hover {
  background-image: url('../../assets/img/pro/watchother2.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* 响应式设计优化 */
@media screen and (max-width: 768px) {
  .standards-management-container {
    padding: 10px;
  }

  .result-card {
    padding: 15px;
  }

  .filter-label {
    min-width: 50px;
    color: #ffffff;
  }

  .search-input-group {
    flex-wrap: wrap;
  }

  /* 小屏幕产品项布局调整 */
  .product-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
  }



  .product-info {
    align-items: center;
  }

  .product-meta {
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .product-title {
    font-size: 16px;
  }

  .product-desc {
    font-size: 13px;
  }

  .product-meta {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

/* 响应式设计下的查看更多按钮调整 */
@media screen and (max-width: 768px) {
  .load-more-button {
    width: 90%;
    max-width: 404px;
  }
}

/* .el-dialog 弹窗样式优化 */
:deep(.el-dialog) {
  border: none;
}

:deep(.el-upload-dragger) {
  border: none;
}

:deep(.el-dialog__header) {
  border-bottom: none;
}

.success-text {
 font-family: Noto Sans SC, Noto Sans SC;
font-weight: 500;
font-size: 30px;
color: #fff;
  margin-top: 50px;
}

/* 弹窗样式 */
:deep(.el-dialog__wrapper) .el-dialog {
  background-color: #182F50;
  border: 1px solid #1A9ADB;
  border-radius: 4px;
}

.download-button {
  width: 97.29px;
  height: 30px;
  background: #182F50;
  border-radius: 0px;
  border: 1px solid;
  border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
  color: white;
  cursor: pointer;
  margin-right: 10px;
  transition: all 0.3s ease;
  /* 按钮倾斜 -10deg */
  transform: skew(-10deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* 移除默认的聚焦效果（黑色框） */
  outline: none;
  /* 确保所有状态下都没有轮廓 */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.download-button:hover,
.upload-button:hover {
  width: 97.29px;
  height: 30px;
  background: linear-gradient(180deg, rgba(0,135,255,0.25) 0%, rgba(0,135,255,0.52) 100%);
  border-radius: 0px;
  border: 1px solid;
  border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
  /* 保持倾斜角度 */
  transform: skew(-10deg);
}

/* 确保按钮文本居中并设置文字大小和反向倾斜 */
.download-button span,
.upload-button span {
  display: inline-block;
  font-size: 12px;
  /* 文字反向倾斜 10deg，使其看起来是正的 */
  transform: skew(10deg);
}


.dialogqxbtn {
  width: 158px;
height: 40px;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  transform: skew(-15deg);
  background: #182F50;
  border-radius: 0px 0px 0px 0px;
  margin-left: 30px;
  border: 1px solid;
  border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
}
.dialogqxbtn span{
  transform: skew(15deg);
}
.dialogqxTwo{
width: 158px;
height: 40px;
  color: #fff;
  text-align: center;
  transform: skew(-15deg);
  margin-right: 30px;

  font-size: 14px;
  line-height: 1;
background: linear-gradient( 180deg, rgba(0,135,255,0.25) 0%, rgba(0,135,255,0.52) 100%);
border-radius: 0px 0px 0px 0px;
border: 1px solid;
border-image: linear-gradient(136deg, rgba(44, 223, 232, 1), rgba(26, 154, 219, 1), rgba(26, 154, 217, 1)) 1 1;
}
.dialogqxTwo span{
  transform: skew(15deg);
}

</style>
<style>

.el-radio-button__inner:focus {
  outline: none;
}

.el-button:focus {
  outline: none;
}

/* 对话框样式 */
.el-dialog {
  background-color: #1a2b45;
  border: 1px solid #fff;
}

.el-dialog__header {
  border-bottom: 1px solid #2CDFE8;
}

.el-dialog__title {
  color: #ffffff;
}

.el-dialog__body {
  color: #ffffff;
}

/* 下拉选择框样式 */
.el-select .el-input__inner {
  background-color: #152133;
  color: #ffffff;
  border: none;
  /* background: linear-gradient( 90deg, #0085FF 0%, rgba(0,163,255,0) 100%); */
}

.el-select .el-input__inner:focus {
  border-color: #2CDFE8;
}

.el-select-dropdown {
  background-color: #1a2b45;
  border: 1px solid #2CDFE8;
}

.el-select-dropdown__item {
  color: #ffffff;
}

.el-select-dropdown__item:hover {
  background-color: #152133;
  color: #2CDFE8;
}

.el-select-dropdown__item.selected {
  color: #2CDFE8;
  background-color: #152133;
}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
  background: linear-gradient( 90deg, #0085FF 0%, rgba(0,163,255,0) 100%);
  color: #fff;
}
</style>